package com.example.sonone.funinterfacetest;

/**
 * @author zjq
 * @since 2022/6/7 20:01
 */
public enum AA {

    /**
     * miao
     */
    SECONDS {
        @Override
        public long toMillis(long d) {
            System.out.println(d);
            return d;
        }
    },

    HOUR {
        @Override
        public long toMillis(long d) {
            System.out.println(d);
            return d;
        }
    };

    public long toMillis(long duration) {
        throw new AbstractMethodError();
    }

    public void sleep(long timeout) throws InterruptedException {
        if (timeout > 0) {
            long ms = toMillis(timeout);

        }
    }


}
